From 828da18b72c75ecd27c6aaaeadbcde8ab00590a2 Mon Sep 17 00:00:00 2001 From: Evan Welsh Date: Sat, 30 Oct 2021 15:11:10 -0700 Subject: [PATCH] background: Don't override synchronous load() with an async version Instead, override the asynchronous version to avoid conflicting with the parent signature. Part-of: --- js/ui/background.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/js/ui/background.js b/js/ui/background.js index 1f7c5e572..1ddb9d6f3 100644 --- a/js/ui/background.js +++ b/js/ui/background.js @@ -177,7 +177,7 @@ var BackgroundCache = class BackgroundCache { animation = new Animation({ file: params.file }); - animation.load(() => { + animation.load_async(null, () => { this._animations[params.settingsSchema] = animation; if (params.onLoaded) { @@ -634,11 +634,12 @@ class Animation extends GnomeDesktop.BGSlideShow { this.loaded = false; } - load(callback) { - this.load_async(null, () => { + // eslint-disable-next-line camelcase + load_async(cancellable, callback) { + super.load_async(cancellable, () => { this.loaded = true; - if (callback) - callback(); + + callback?.(); }); } -- 2.39.5